package cn.ibdsr.human.db.mapper;

import cn.ibdsr.human.db.model.User;
import cn.ibdsr.human.transfer.company.CompanyResponseDTO;
import cn.ibdsr.human.transfer.platform.UserListDetailDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author cdl
 * @since 2021-08-02
 */
public interface UserMapper extends BaseMapper<User> {
    /**
     *
     * @param page
     * @param name
     * @param phone
     * @param major
     * @param jobStatus
     * @param gender
     * @param experience
     * @param minAge
     * @param maxAge
     * @return
     */
    List<UserListDetailDTO> listByPage(@Param("page") Page<UserListDetailDTO> page,
                                       @Param("name") String name,
                                       @Param("phone") String phone,
                                       @Param("major") String major,
                                       @Param("jobStatus") Integer jobStatus,
                                       @Param("gender") Integer gender,
                                       @Param("experience") Integer experience,
                                       @Param("minAge") Integer minAge,
                                       @Param("maxAge") Integer maxAge);

    /**
     * 分页获取企业列表
     * @param page
     * @param userPhone
     * @param code
     * @param name
     * @param creditCode
     * @param proper
     * @param status
     * @return
     */
    List<CompanyResponseDTO> listCompaniesByPage(@Param("page") Page<CompanyResponseDTO> page,
                                                 @Param("userPhone") String userPhone,
                                                 @Param("code") String code,
                                                 @Param("name") String name,
                                                 @Param("creditCode") String creditCode,
                                                 @Param("proper") Integer proper,
                                                 @Param("status") Integer status);
}
